import { request } from "../../utils/request";
/** 质效评估 记录 列表 POST */
export async function pageRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<AssessRecordData.Record[]>>(
    '/assess/record/page',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 质效评估 记录 保存 POST */
export async function selectRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/assess/record/select', {
    method: 'POST',
    data: options || {},
  });
}

/** 质效评估 记录 保存 POST */
export async function saveRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/assess/record/save', {
    method: 'POST',
    data: options || {},
  });
}

/** 质效评估 记录 更新 POST */
export async function updateRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/assess/record/update', {
    method: 'POST',
    data: options || {},
  });
}

/** 质效评估 记录 删除 POST */
export async function deleteRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/assess/record/delete', {
    method: 'POST',
    data: options || {},
  });
}

/** 质效评估 记录 更 状态 新 POST */
export async function updateRecordState(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/assess/record/update/state', {
    method: 'POST',
    data: options || {},
  });
}

/** 质效评估 来源列表 POST */
export async function searchTreeSource(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AdminOrganizationData.Organization[]>>(
    '/assess/record/page/init',
    {
      method: 'GET',
      data: options || {},
    },
  );
}

/**
 * 参与组织树
 * @param options
 * @returns
 */
export async function treeParticipateOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AdminOrganizationData.Organization[]>>(
    '/assess/record/participate/organization/tree',
    {
      method: 'POST',
      data: options || {},
    },
  );
}
/**
 * 区域Area
 * @param options
 * @returns
 */
export async function treeAssessRecordArea(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AdminOrganizationData.Organization[]>>(
    '/assess/record/area/tree',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

